<?php
namespace app\beautiful\model;
use app\common\model\CommonModel;

class CouponModel extends CommonModel{
    protected  $name = 'beautiful_coupon';
    protected  $pk   = 'coupon_id';

    public function getValidityTimeAttr($value,$data)
    {
        return [$data['valid_bg_time'],$data['valid_end_time']];
    }

    public function getReleaseTimeAttr($value,$data)
    {
        return [$data['start_time'],$data['end_time']];
    }
}